// jshint ignore: start
+function($){

var provinceList = [];

$.ajax({
    type: "POST",
    url: "/wechatOpportunity/wxGetProvince",
    async : false,
    success: function (data) {
        var list = data.provinceList;
        for (var i=0;i<list.length;i++){
          var province = {};
          province['name'] = list[i].name;
          province['code'] = list[i].id;
          province['sub'] = []
          var cityList = []
          for(var j=0; j<list[i].cities.length;j++){
            var city = {};
            city['name'] = list[i].cities[j].name;
            city['code'] = list[i].cities[j].id;
            city['sub'] = []
            var districtList = [];
            for(var m=0;m<list[i].cities[j].districts.length;m++){
              var district = {};
              district['name'] = list[i].cities[j].districts[m].name;
              district['code'] = list[i].cities[j].districts[m].name;
              districtList.push(district);
              city['sub'].push(district);
            }
            cityList.push(city);
            province['sub'].push(city);
          }
          provinceList.push(province);
        }

    },
    error: function () {
      console.log("省获取失败，请稍后重试");
    }
});

$.rawCitiesData = provinceList
}($);
// jshint ignore: end
